<script setup>
import { ref } from 'vue';
import MovieList from '../../components/List.vue'
import { getMovieList } from '../../api/index'

const movieList = ref([])

</script>

<template>
  <MovieList :get-data="getMovieList" v-model="movieList" :parmas="{a:123}">
    <van-card
      v-for="item in movieList"
      :key="item.name"
      :desc="item.desc"
      :title="item.name"
      :thumb="item.cover || '/pikaqiu.png'"
      @click="$router.push('/detail/' + item.id)"
    >
      <template #tags>
        <div>{{ item.star }}</div>
      </template>
      <template #price>
        <div v-if="item.time">{{ item.time }}分钟</div>
      </template>
      <template #num>
        <div v-if="item.playTime">上映时间：{{ item.playTime }}</div>
      </template>
    </van-card>
  </MovieList>
</template>

<style scoped>

</style>
